//
//  DeviceManager.h
//  IOS_SST
//
//  Created by lfy on 16/4/25.
//  Copyright © 2016年 jiahua. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Define.h"
#import "SSTDevice.h"
#import "SstDevice.h"

@interface DeviceManager : NSObject

+(DeviceManager *)Instance;

@property NSString *sessionID;

/**
 *  周期性设置sessionID
 *
 *  @param sessionID
 *  @param deviceIDs
 */
-(void)setSession: (NSString*) sessionID withDeviceIDs: (NSArray*)devices;

/**
 *  设置无线网
 *
 *  @param ssid     无线网账户
 *  @param password 无线网密码
 */
-(void)setWIFIwithSSID: (NSString*) ssid withPassword: (NSString*)password;

/**
 *  设置基本ip、Mac和DeviceID
 *
 *  @param deviceID
 *  @param mac
 *  @param ip
 */
-(void)setDeviceInformation: (NSString *) deviceID withMac: (NSString *)mac withIP: (NSString*)ip;

-(void)setIsLegacyDeviceByIp: (NSString *)ip;

-(Boolean)getIsLegacyDevice: (NSString *)ip;

/**
 *  根据Ip地址获取设备
 *
 *  @param ip
 */
-(SstDevice *)getSstDeviceByIp: (NSString *)ip;

/**
 *  根据Ip地址设置设备的UDPKeyID
 *
 *  @param ip
 *  @param udpKeyIdStr       16进制的udp key id
 */
-(void)setDeviceUdpKeyIdByIP: (NSString *)ip newUdpKeyId: (u8 *) udpKeyIdStr;

/**
 *  设置设备是否已经获取到R3
 *
 *  @param device
 *  @param get
 */
-(void)setDeviceHasGetR3:(SstDevice *)device hasGetR3: (Boolean) get;
@end
